<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
 * etc:smarty模版
 * author:deepe.xiao
 */

//include_once("tp/Smarty.class.php");
include_once("smarty-3.1.33/Autoloader.php");
include_once("smarty-3.1.33/bootstrap.php");

class Mytp extends Smarty
{
	function __construct()
	{

		parent::__construct();
        $this->template_dir = FCPATH."/app/views/";
		$this->compile_dir = FCPATH."/app/phpcache/";
		$this->left_delimiter = "{"; //左边界
        $this->right_delimiter = "}"; //右边界
        $this->assign('_TEMPLATESDIR',trim(config_item('base_url').'/app/views'));
        $this->assign('_SOURCEDIR',config_item('base_url').'/app/static');
		$this->assign('_BASEURL',config_item('base_url'));
	}
	
	function tp($file)
	{
		$this->display($file.".tpl");
	}
		
}
?>


